<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core" template="../index.xhtml">

	<h:head>
		<f:facet name="first">
			<meta content='text/html; charset=UTF-8' http-equiv="Content-Type" />
			<title>Sistema UTI Neonatal</title>
		</f:facet>
	</h:head>

	<ui:define name="content">

		<h:form id="formTableHE">
			
			<p:accordionPanel id="accGerenciarDiagnosticos" activeIndex="0"
					multiple="true">

				<p:tab title="Gerenciar Históricos de Enfermagem">

					<p:growl id="messages" showDetail="true" />

					<p:dataTable id="tableHE" var="he"
						value="#{pacienteController.pacienteDataModel}" paginator="true" rows="5"
						selection="#{pacienteController.pacientePesqSelecionado}" selectionMode="single"
						paginatorPosition="bottom" widgetVar="heTable" emptyMessage="Nenhum registro encontrado!">

						<p:ajax event="rowSelect"
							update=":formTableHE:accGerenciarDiagnosticos:tableHE" />
							
						<f:facet name="header">
						
							<h:outputText value="Pesquisar: "
								style="margin-left:4px;margin-top:4px;float:left;position:relative" />
								
							<p:inputText id="globalFilter"
								style="margin-left:3px;float:left;position:relative;width:150px" value="#{pacienteController.pacientePesq.nome}" />
								
							<p:commandButton id="botaoPesquisar" icon="ui-icon-search"
									update=":formTableHE:accGerenciarDiagnosticos:tableHE"
									actionListener="#{pacienteController.pesquisarPaciente}"
									style="margin-left:4px;margin-top:2px;width:20px;height:20px;float:left;position:relative"></p:commandButton>
									
						</f:facet>

						<p:column id="identificadorColumn" headerText="Identificador" style="width: 10%">
							<h:outputText value="#{he.id}" />
						</p:column>

						<p:column id="descricaoColumn" headerText="Nome" style="width: 60%">
							<h:outputText value="#{he.nome}" />
						</p:column>
						
						<p:column id="sintomaColumn" headerText="Data Admissão" style="width: 30%">
							<h:outputText value="#{he.data_admissao}" />
						</p:column>
						
					</p:dataTable>

				</p:tab>
			
			</p:accordionPanel>
			
		</h:form>
			
	</ui:define>
</ui:composition>